<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <script src="https://unpkg.com/vue"></script>
    <link href="https://cdn.bootcss.com/iview/2.2.0/styles/iview.css" rel="stylesheet">

    <script src="https://cdn.bootcss.com/iview/2.2.0/locale/zh-CN.js"></script>
    <script src="https://cdn.bootcss.com/iview/2.2.0/iview.min.js"></script>

</head>

<body>



    <div id="testOne">

        <Card>
            <p slot='title'>
                手机版微信分享测试
            </p>
            <p>
                <i-button type='primary' v-on:click="shareQQ">
                    <Icon type="share"></Icon>
                    分享微信朋友圈</i-button>
            </p>
            <p>
                <i-button type='primary' v-on:click="share2">
                    <Icon type="share"></Icon>
                    分享微信好友</i-button>
            </p>
        </Card>
        <Card>
            <p slot='title'>
                手机版QQ分享
            </p>
            <p>
                <i-button type='primary' v-on:click="share3">
                    <Icon type="share"></Icon>
                    分享QQ空间</i-button>
            </p>
            <p>
                <i-button type='primary' v-on:click="share4">
                    <Icon type="share"></Icon>
                    分享QQ好友</i-button>
            </p>
        </Card>
        <Card>
            <p slot='title'>
                手机版微博分享
            </p>
            <p>
                <i-button type='primary' v-on:click="share5">
                    <Icon type="share"></Icon>
                    微博 </i-button>
            </p>
        
        </Card>
    </div>
    <script src="https://jsapi.qq.com/get?api=app.share"></script>
    <script src="../js/ShareHelper2.0.js"></script>
    <script>
        new Vue({
            el: '#testOne',
            data: {
                visible: false
            },
            methods: {
                show: function () {
                    this.visible = !this.visible;
                },
                //分享到微信朋友圈
                shareQQ: function () {
                    console.info(browser);
                    browser.app.share({
                        title: '测试标题',
                        description: '测试描述',
                        url: 'http://movie.tianma3798.cn/',
                        img_url: 'http://www.cbooo.cn/moviepic/229733.jpg',
                        from: '观影者',
                        to_app: 8,
                    })
                },
                //分享到微信好友
                share2: function () {
                    browser.app.share({
                        title: '测试标题',
                        description: '测试描述',
                        url: 'http://movie.tianma3798.cn/',
                        img_url: 'http://www.cbooo.cn/moviepic/229733.jpg',
                        from: '观影者',
                        to_app: 1,
                    })
                },
                share3: function () {
                    browser.app.share({
                        title: '测试标题',
                        description: '测试描述',
                        url: 'http://movie.tianma3798.cn/',
                        img_url: 'http://www.cbooo.cn/moviepic/229733.jpg',
                        from: '观影者',
                        to_app: 3,
                    })
                },
                share4: function () {
                    browser.app.share({
                        title: '测试标题',
                        description: '测试描述',
                        url: 'http://movie.tianma3798.cn/',
                        img_url: 'http://www.cbooo.cn/moviepic/229733.jpg',
                        from: '观影者',
                        to_app: 4,
                    })
                },
                share5: function () {
                    browser.app.share({
                        title: '测试标题',
                        description: '测试描述',
                        url: 'http://movie.tianma3798.cn/',
                        img_url: 'http://www.cbooo.cn/moviepic/229733.jpg',
                        from: '观影者',
                        to_app: 11,
                    })
                }
                
            }
        });
    </script>

</body>

</html>